package com.cohesion.bootstrap.action;

import java.util.Map;

import com.cohesion.bootstrap.common.PublicConstants;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.util.logging.Logger;



public class LoginAction extends ActionSupport 
{
	private static Logger m_logger;
	private final static String ERROR_PAGE = "error";
	private String username;
	private String password;
	
	public String execute()
	{
//		m_logger.info("test login");
		System.out.println("entering login");
		System.out.println(username+"is using password : "+password);
		Map<String,Object> session=ActionContext.getContext().getSession();
		session.put(PublicConstants.USER_ID, username);
		
		return SUCCESS;
	}

	private String parseUserId(String username2) {
		// TODO Auto-generated method stub
		return null;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUsername() {
		return username;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPassword() {
		return password;
	}
	
	
	

}
